package com.unittec.zk.provider.exam.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.unittec.zk.sdk.exam.domain.PaperQuAnswerExtDTO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.unittec.zk.provider.exam.mapper.ElPaperQuAnswerMapper;
import com.unittec.zk.provider.exam.entity.ElPaperQuAnswer;
@Service
public class ElPaperQuAnswerService extends ServiceImpl<ElPaperQuAnswerMapper, ElPaperQuAnswer> {

    public List<PaperQuAnswerExtDTO> listForExam(String paperId, String quId) {
        return baseMapper.list(paperId, quId);
    }

    public List<ElPaperQuAnswer> listForFill(String paperId, String quId) {
        //查询条件
        QueryWrapper<ElPaperQuAnswer> wrapper = new QueryWrapper<>();
        wrapper.lambda()
                .eq(ElPaperQuAnswer::getPaperId, paperId)
                .eq(ElPaperQuAnswer::getQuId, quId);

        return this.list(wrapper);
    }
}
